<template>
  <div class="about">
    <!-- <ckeditor
      :editor="editor"
      v-model="editorData"
      :config="editorConfig"
    ></ckeditor> -->
    <div id="editor"></div>
  </div>
</template>
<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import ClassicEditor from '@ckeditor/ckeditor5-build-classic';
//自定义插件报错
// import MyUploadAdapter from "../utils/my-upload-adapter";

@Component({
  components: {}
})
export default class About extends Vue {
  editor = ClassicEditor;
  editorData = '<p>Content of the editor.</p>';
  editorConfig = {
    toolbar: ['bold', 'link', 'numberedList', 'bulletedList']
  };

  mounted() {
    ClassicEditor.create(document.querySelector('#editor'), {
      toolbar: ['bold', 'link', 'numberedList', 'bulletedList']
      // extraPlugins: [MyUploadAdapter]

      // ...
    }).catch((error: unknown) => {
      console.log(error);
    });
  }
}
</script>
